import { Article } from "@/types";
import { Avatar, Card, Typography } from "antd";
import "./index.less";
const { Meta } = Card;
interface ArticleCardStandardProps {
  article: Article;
}

const { Paragraph } = Typography;
const ArticleCardStandard: React.FC<Article> = ({
  cover,
  title,
  brief,
  author,
  createAt,
}) => {
  return (
    <Card
      className="w-full"
      hoverable
      cover={<img alt="example" src={cover} />}
    >
      <div className="article-content">
        <div className="title">{title}</div>
        <Paragraph className="brief" ellipsis={{ rows: 5 }}>
          {brief}
        </Paragraph>
        <div className="info">
          <Avatar
            className="avatar"
            src="https://api.dicebear.com/7.x/miniavs/svg?seed=8"
          />
          <span className="nick-name">{author}</span>
          <span className="public-date">{createAt}</span>
        </div>
      </div>
    </Card>
  );
};
export default ArticleCardStandard;
